#include "STC89C5xRC.H"
#include "buzzer.h"
#include "sys.h"
#include "task.h"

#if BUZZER_TASK

sbit buzzer_pin = P2 ^ 3;

/* define your status start */
static bool buzzer_status = 0;
/* define your status end */

/**
 * @brief buzzer_init
 *
 */
void buzzer_init(void)
{
    buzzer_pin = BUZZER_INIT_LEVEL;
}

/**
 * @brief buzzer_set
 *
 * @param level
 */
void buzzer_set(bool level)
{
    buzzer_pin = level;
}

/**
 * @brief buzzer_demo
 *
 */
void buzzer_demo(void)
{
    buzzer_status = !buzzer_status;
    buzzer_set(buzzer_status);
}

#endif